﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BLToolkit.Data;
using BLToolkit.DataAccess;
using BLToolkit.Mapping;
using Devsoft.DB.Models;
namespace Data_Access_Layer
{
	[TableName("Permission")]
	public class Permission : Devsoft.DB.Models.Flat.Model<Permission>
	{
		private int rolId;

		/// <summary>
		/// RolId là mã bộ phận được phân quyền.
		/// </summary>
		public int RolId
		{
			get { return rolId; }
			set { rolId = value; }

		}

		private int accId;
		/// <summary>
		///AccId Mã ứng dụng .
		/// </summary>
		public int AccId
		{
			get { return accId; }
			set { accId = value; }
		}

		private bool deleted;
		/// <summary>
		/// Deleted Phân quyền  đã bị xóa chưa.
		/// </summary>
		public bool Deleted
		{
			get { return deleted; }
			set { deleted = value; }
		}

		[Association(ThisKey = "AccId", OtherKey = "Id", CanBeNull = false)]
		public Account Account { get; set; }

		[Association(ThisKey = "RolId", OtherKey = "Id", CanBeNull = false)]
		public Role Role { get; set; }

	}
}
